package com.amtf.datafile3.cfg.fil;

import com.amtf.datafile3.cfg.std.StdDataTableDefinition;
import com.amtf.datafile3.core.fil.parser.FilDataRecordParser;
import com.amtf.datafile3.core.fil.render.FilDataRecordRender;

public class FilDataTableDefinition extends StdDataTableDefinition {
	private String charset = "UTF-8";
	private int startRow = 1;
	private boolean firstRowTitle = false;

	public FilDataTableDefinition(String name, String charset, int startRow, boolean firstRowTitle) {
		super(name, new FilDataRecordParser(), new FilDataRecordRender());
		this.charset = charset;
		this.startRow = startRow;
		this.firstRowTitle = firstRowTitle;
	}

	@Override
	public FilDataTableDefinition clone() {
		FilDataTableDefinition cloneDef = new FilDataTableDefinition(name, charset, startRow, firstRowTitle);
		copyTo(cloneDef);
		return cloneDef;
	}

	public String getCharset() {
		return charset;
	}

	public void setCharset(String charset) {
		this.charset = charset;
	}

	public int getStartRow() {
		return startRow;
	}

	public void setStartRow(int startRow) {
		this.startRow = startRow;
	}

	public boolean isFirstRowTitle() {
		return firstRowTitle;
	}

	public void setFirstRowTitle(boolean firstRowTitle) {
		this.firstRowTitle = firstRowTitle;
	}

}
